i=1
while i<=9:
    print()
    j=1
    while j<=i:
       print("{}*{}={:<4}".format(i,j,i*j),end=" ")
       j+=1
    i+=1

for i in range(1,10):
    print()
    for j in range(1,i+1):
        print("{}*{}={:<4}".format(i, j, i * j),end="")


j=9
while j>=1:
    print()
    i=1
    while i<=j:
       print("{}*{}={:<4}".format(i,j,i*j),end=" ")
       i+=1
    j-=1

for i in range(9,0,-1):
    print()
    for j in range(1,i+1):
        print("{}*{}={:<4}".format(i, j, i * j), end=" ")



while i <= 9:
    k = 1
    while k <= 9 - i:
        print(end=' '*8)
        k += 1
    j=i
    while j >= 1:
        print("{}✖{}={:<4}".format(j,i,i*j),end=" ")
        j-=1
    print()
    i+=1

for i in range(1,10):
    for k in range(1,10-i):         #判断应该用多少个空格来填充前面的空白
        print(end=" "*8)
    for j in range(i,0,-1):
        print("{}✖{}={:<4}".format(j,i,i*j),end=" ")
    print()
i = 9
while i >= 1:
    k = 1
    while k <= 9 - i:         #判断应该用多少个空格来填充前面的空白
        print(end = '         ')
        k += 1
    j=i
    while j >= 1:
        print("{}✖{}={:<4}".format(j,i,i*j),end=" ")
        j-=1
    print()
    i-=1
    
for i in range(9,0,-1):
    for k in range(1,10-i):         #判断应该用多少个空格来填充前面的空白
        print(end="         ")
    for j in range(i,0,-1):
        print("{}✖{}={:<4}".format(j,i,i*j),end=" ")
    print()